Optimal. Leaf size=176 \[ -\frac {a b^2 \left (3 a^2-2 b^2\right ) \tanh ^{-1}\left (\frac {b \cos (x)-a \sin (x)}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{7/2}}+\frac {2 a b \left (a^2-b^2\right ) \cos (x)}{\left (a^2+b^2\right )^3}-\frac {2 a b \cos ^3(x)}{3 \left (a^2+b^2\right )^2}-\frac {b^2 \left (3 a^2-b^2\right ) \sin (x)}{\left (a^2+b^2\right )^3}+\frac {\left (a^2-b^2\right ) \sin ^3(x)}{3 \left (a^2+b^2\right )^2}-\frac {a^2 b^3}{\left (a^2+b^2\right )^3 (a \cos (x)+b \sin (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.49, antiderivative size = 238, normalized size of antiderivative = 1.35, number of steps
used = 33, number of rules used = 12, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules used = {3190, 3188,
2713, 2645, 30, 3179, 2717, 3153, 212, 2644, 2718, 3234} \begin {gather*} -\frac {b^2 \sin ^3(x)}{3 \left (a^2+b^2\right )^2}+\frac {a^2 \sin ^3(x)}{3 \left (a^2+b^2\right )^2}+\frac {b^2 \sin (x)}{\left (a^2+b^2\right )^2}-\frac {4 a^2 b^2 \sin (x)}{\left (a^2+b^2\right )^3}-\frac {2 a b \cos ^3(x)}{3 \left (a^2+b^2\right )^2}+\frac {2 a b^4 \tanh ^{-1}\left (\frac {b \cos (x)-a \sin (x)}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{7/2}}-\frac {2 a b^3 \cos (x)}{\left (a^2+b^2\right )^3}-\frac {a^2 b^3}{\left (a^2+b^2\right )^3 (a \cos (x)+b \sin (x))}+\frac {2 a^3 b \cos (x)}{\left (a^2+b^2\right )^3}-\frac {3 a^3 b^2 \tanh ^{-1}\left (\frac {b \cos (x)-a \sin (x)}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{7/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 212
Rule 2644
Rule 2645
Rule 2713
Rule 2717
Rule 2718
Rule 3153
Rule 3179
Rule 3188
Rule 3190
Rule 3234
Rubi steps
\begin {align*} \int \frac {\cos ^3(x) \sin ^2(x)}{(a \cos (x)+b \sin (x))^2} \, dx &=\frac {a \int \frac {\cos ^2(x) \sin ^2(x)}{a \cos (x)+b \sin (x)} \, dx}{a^2+b^2}+\frac {b \int \frac {\cos ^3(x) \sin (x)}{a \cos (x)+b \sin (x)} \, dx}{a^2+b^2}-\frac {(a b) \int \frac {\cos ^2(x) \sin (x)}{(a \cos (x)+b \sin (x))^2} \, dx}{a^2+b^2}\\ &=\frac {a^2 \int \cos (x) \sin ^2(x) \, dx}{\left (a^2+b^2\right )^2}+2 \frac {(a b) \int \cos ^2(x) \sin (x) \, dx}{\left (a^2+b^2\right )^2}-2 \frac {\left (a^2 b\right ) \int \frac {\cos (x) \sin (x)}{a \cos (x)+b \sin (x)} \, dx}{\left (a^2+b^2\right )^2}+\frac {b^2 \int \cos ^3(x) \, dx}{\left (a^2+b^2\right )^2}-2 \frac {\left (a b^2\right ) \int \frac {\cos ^2(x)}{a \cos (x)+b \sin (x)} \, dx}{\left (a^2+b^2\right )^2}+\frac {\left (a^2 b^2\right ) \int \frac {\cos (x)}{(a \cos (x)+b \sin (x))^2} \, dx}{\left (a^2+b^2\right )^2}\\ &=-\frac {a^2 b^3}{\left (a^2+b^2\right )^3 (a \cos (x)+b \sin (x))}-2 \left (\frac {\left (a^3 b\right ) \int \sin (x) \, dx}{\left (a^2+b^2\right )^3}+\frac {\left (a^2 b^2\right ) \int \cos (x) \, dx}{\left (a^2+b^2\right )^3}-\frac {\left (a^3 b^2\right ) \int \frac {1}{a \cos (x)+b \sin (x)} \, dx}{\left (a^2+b^2\right )^3}\right )+\frac {\left (a^3 b^2\right ) \int \frac {1}{a \cos (x)+b \sin (x)} \, dx}{\left (a^2+b^2\right )^3}-2 \left (\frac {a b^3 \cos (x)}{\left (a^2+b^2\right )^3}+\frac {\left (a^2 b^2\right ) \int \cos (x) \, dx}{\left (a^2+b^2\right )^3}+\frac {\left (a b^4\right ) \int \frac {1}{a \cos (x)+b \sin (x)} \, dx}{\left (a^2+b^2\right )^3}\right )+\frac {a^2 \text {Subst}\left (\int x^2 \, dx,x,\sin (x)\right )}{\left (a^2+b^2\right )^2}-2 \frac {(a b) \text {Subst}\left (\int x^2 \, dx,x,\cos (x)\right )}{\left (a^2+b^2\right )^2}-\frac {b^2 \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (x)\right )}{\left (a^2+b^2\right )^2}\\ &=-\frac {2 a b \cos ^3(x)}{3 \left (a^2+b^2\right )^2}+\frac {b^2 \sin (x)}{\left (a^2+b^2\right )^2}+\frac {a^2 \sin ^3(x)}{3 \left (a^2+b^2\right )^2}-\frac {b^2 \sin ^3(x)}{3 \left (a^2+b^2\right )^2}-\frac {a^2 b^3}{\left (a^2+b^2\right )^3 (a \cos (x)+b \sin (x))}-\frac {\left (a^3 b^2\right ) \text {Subst}\left (\int \frac {1}{a^2+b^2-x^2} \, dx,x,b \cos (x)-a \sin (x)\right )}{\left (a^2+b^2\right )^3}-2 \left (-\frac {a^3 b \cos (x)}{\left (a^2+b^2\right )^3}+\frac {a^2 b^2 \sin (x)}{\left (a^2+b^2\right )^3}+\frac {\left (a^3 b^2\right ) \text {Subst}\left (\int \frac {1}{a^2+b^2-x^2} \, dx,x,b \cos (x)-a \sin (x)\right )}{\left (a^2+b^2\right )^3}\right )-2 \left (\frac {a b^3 \cos (x)}{\left (a^2+b^2\right )^3}+\frac {a^2 b^2 \sin (x)}{\left (a^2+b^2\right )^3}-\frac {\left (a b^4\right ) \text {Subst}\left (\int \frac {1}{a^2+b^2-x^2} \, dx,x,b \cos (x)-a \sin (x)\right )}{\left (a^2+b^2\right )^3}\right )\\ &=-\frac {a^3 b^2 \tanh ^{-1}\left (\frac {b \cos (x)-a \sin (x)}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{7/2}}-\frac {2 a b \cos ^3(x)}{3 \left (a^2+b^2\right )^2}+\frac {b^2 \sin (x)}{\left (a^2+b^2\right )^2}+\frac {a^2 \sin ^3(x)}{3 \left (a^2+b^2\right )^2}-\frac {b^2 \sin ^3(x)}{3 \left (a^2+b^2\right )^2}-\frac {a^2 b^3}{\left (a^2+b^2\right )^3 (a \cos (x)+b \sin (x))}-2 \left (\frac {a^3 b^2 \tanh ^{-1}\left (\frac {b \cos (x)-a \sin (x)}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{7/2}}-\frac {a^3 b \cos (x)}{\left (a^2+b^2\right )^3}+\frac {a^2 b^2 \sin (x)}{\left (a^2+b^2\right )^3}\right )-2 \left (-\frac {a b^4 \tanh ^{-1}\left (\frac {b \cos (x)-a \sin (x)}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{7/2}}+\frac {a b^3 \cos (x)}{\left (a^2+b^2\right )^3}+\frac {a^2 b^2 \sin (x)}{\left (a^2+b^2\right )^3}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.34, size = 198, normalized size = 1.12 \begin {gather*} \frac {2 a b^2 \left (3 a^2-2 b^2\right ) \tanh ^{-1}\left (\frac {-b+a \tan \left (\frac {x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{7/2}}-\frac {-21 a^4 b+90 a^2 b^3-9 b^5-4 b \left (3 a^4+a^2 b^2-2 b^4\right ) \cos (2 x)+b \left (a^2+b^2\right )^2 \cos (4 x)-2 a^5 \sin (2 x)+16 a^3 b^2 \sin (2 x)+18 a b^4 \sin (2 x)+a^5 \sin (4 x)+2 a^3 b^2 \sin (4 x)+a b^4 \sin (4 x)}{24 \left (a^2+b^2\right )^3 (a \cos (x)+b \sin (x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.59, size = 265, normalized size = 1.51
method | result | size |
default | \(-\frac {2 a \,b^{2} \left (\frac {-b^{2} \tan \left (\frac {x}{2}\right )-a b}{a \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-2 b \tan \left (\frac {x}{2}\right )-a}-\frac {\left (3 a^{2}-2 b^{2}\right ) \arctanh \left (\frac {2 a \tan \left (\frac {x}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}\right )}{\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \left (a^{2}+b^{2}\right )}-\frac {2 \left (\left (3 a^{2} b^{2}-b^{4}\right ) \left (\tan ^{5}\left (\frac {x}{2}\right )\right )+4 a \,b^{3} \left (\tan ^{4}\left (\frac {x}{2}\right )\right )+\left (-\frac {4}{3} a^{4}+6 a^{2} b^{2}-\frac {2}{3} b^{4}\right ) \left (\tan ^{3}\left (\frac {x}{2}\right )\right )+\left (-4 a^{3} b +4 a \,b^{3}\right ) \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+\left (3 a^{2} b^{2}-b^{4}\right ) \tan \left (\frac {x}{2}\right )-\frac {4 a^{3} b}{3}+\frac {8 a \,b^{3}}{3}\right )}{\left (a^{2}+b^{2}\right ) \left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )^{3}}\) | \(265\) |
risch | \(\frac {i {\mathrm e}^{3 i x}}{-48 i a b +24 a^{2}-24 b^{2}}+\frac {3 \,{\mathrm e}^{i x} b}{8 \left (-3 i a^{2} b +i b^{3}+a^{3}-3 a \,b^{2}\right )}-\frac {i {\mathrm e}^{i x} a}{8 \left (-3 i a^{2} b +i b^{3}+a^{3}-3 a \,b^{2}\right )}+\frac {3 \,{\mathrm e}^{-i x} b}{8 \left (i b +a \right )^{3}}+\frac {i {\mathrm e}^{-i x} a}{8 \left (i b +a \right )^{3}}-\frac {i {\mathrm e}^{-3 i x}}{24 \left (i b +a \right )^{2}}-\frac {2 a^{2} b^{3} {\mathrm e}^{i x}}{\left (i b +a \right )^{3} \left (-i b +a \right )^{3} \left (-i b \,{\mathrm e}^{2 i x}+a \,{\mathrm e}^{2 i x}+i b +a \right )}-\frac {3 b^{2} a^{3} \ln \left ({\mathrm e}^{i x}-\frac {i a^{7}+3 i a^{5} b^{2}+3 i a^{3} b^{4}+i a \,b^{6}-a^{6} b -3 a^{4} b^{3}-3 a^{2} b^{5}-b^{7}}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}}}+\frac {2 b^{4} a \ln \left ({\mathrm e}^{i x}-\frac {i a^{7}+3 i a^{5} b^{2}+3 i a^{3} b^{4}+i a \,b^{6}-a^{6} b -3 a^{4} b^{3}-3 a^{2} b^{5}-b^{7}}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}}}+\frac {3 b^{2} a^{3} \ln \left ({\mathrm e}^{i x}+\frac {i a^{7}+3 i a^{5} b^{2}+3 i a^{3} b^{4}+i a \,b^{6}-a^{6} b -3 a^{4} b^{3}-3 a^{2} b^{5}-b^{7}}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}}}-\frac {2 b^{4} a \ln \left ({\mathrm e}^{i x}+\frac {i a^{7}+3 i a^{5} b^{2}+3 i a^{3} b^{4}+i a \,b^{6}-a^{6} b -3 a^{4} b^{3}-3 a^{2} b^{5}-b^{7}}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {7}{2}}}\) | \(565\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 606 vs.
\(2 (168) = 336\).
time = 0.49, size = 606, normalized size = 3.44 \begin {gather*} -\frac {{\left (3 \, a^{2} b^{2} - 2 \, b^{4}\right )} a \log \left (\frac {b - \frac {a \sin \left (x\right )}{\cos \left (x\right ) + 1} + \sqrt {a^{2} + b^{2}}}{b - \frac {a \sin \left (x\right )}{\cos \left (x\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{{\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )} \sqrt {a^{2} + b^{2}}} + \frac {2 \, {\left (4 \, a^{4} b - 11 \, a^{2} b^{3} - \frac {{\left (a^{3} b^{2} + 16 \, a b^{4}\right )} \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {{\left (8 \, a^{4} b - 31 \, a^{2} b^{3} + 6 \, b^{5}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {{\left (4 \, a^{5} + 15 \, a^{3} b^{2} - 34 \, a b^{4}\right )} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} - \frac {{\left (4 \, a^{4} b + 45 \, a^{2} b^{3} - 4 \, b^{5}\right )} \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} - \frac {{\left (4 \, a^{5} - 9 \, a^{3} b^{2} + 32 \, a b^{4}\right )} \sin \left (x\right )^{5}}{{\left (\cos \left (x\right ) + 1\right )}^{5}} - \frac {3 \, {\left (3 \, a^{2} b^{3} - 2 \, b^{5}\right )} \sin \left (x\right )^{6}}{{\left (\cos \left (x\right ) + 1\right )}^{6}} + \frac {3 \, {\left (3 \, a^{3} b^{2} - 2 \, a b^{4}\right )} \sin \left (x\right )^{7}}{{\left (\cos \left (x\right ) + 1\right )}^{7}}\right )}}{3 \, {\left (a^{7} + 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} + a b^{6} + \frac {2 \, {\left (a^{6} b + 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} + b^{7}\right )} \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {2 \, {\left (a^{7} + 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} + a b^{6}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {6 \, {\left (a^{6} b + 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} + b^{7}\right )} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac {6 \, {\left (a^{6} b + 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} + b^{7}\right )} \sin \left (x\right )^{5}}{{\left (\cos \left (x\right ) + 1\right )}^{5}} - \frac {2 \, {\left (a^{7} + 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} + a b^{6}\right )} \sin \left (x\right )^{6}}{{\left (\cos \left (x\right ) + 1\right )}^{6}} + \frac {2 \, {\left (a^{6} b + 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} + b^{7}\right )} \sin \left (x\right )^{7}}{{\left (\cos \left (x\right ) + 1\right )}^{7}} - \frac {{\left (a^{7} + 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} + a b^{6}\right )} \sin \left (x\right )^{8}}{{\left (\cos \left (x\right ) + 1\right )}^{8}}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 369 vs.
\(2 (168) = 336\).
time = 1.72, size = 369, normalized size = 2.10 \begin {gather*} \frac {2 \, a^{6} b - 22 \, a^{4} b^{3} - 20 \, a^{2} b^{5} + 4 \, b^{7} - 2 \, {\left (a^{6} b + 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} + b^{7}\right )} \cos \left (x\right )^{4} + 2 \, {\left (4 \, a^{6} b + 7 \, a^{4} b^{3} + 2 \, a^{2} b^{5} - b^{7}\right )} \cos \left (x\right )^{2} - 3 \, \sqrt {a^{2} + b^{2}} {\left ({\left (3 \, a^{4} b^{2} - 2 \, a^{2} b^{4}\right )} \cos \left (x\right ) + {\left (3 \, a^{3} b^{3} - 2 \, a b^{5}\right )} \sin \left (x\right )\right )} \log \left (\frac {2 \, a b \cos \left (x\right ) \sin \left (x\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} - 2 \, a^{2} - b^{2} - 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cos \left (x\right ) - a \sin \left (x\right )\right )}}{2 \, a b \cos \left (x\right ) \sin \left (x\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + b^{2}}\right ) - 2 \, {\left ({\left (a^{7} + 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} + a b^{6}\right )} \cos \left (x\right )^{3} - {\left (a^{7} - 2 \, a^{5} b^{2} - 7 \, a^{3} b^{4} - 4 \, a b^{6}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{6 \, {\left ({\left (a^{9} + 4 \, a^{7} b^{2} + 6 \, a^{5} b^{4} + 4 \, a^{3} b^{6} + a b^{8}\right )} \cos \left (x\right ) + {\left (a^{8} b + 4 \, a^{6} b^{3} + 6 \, a^{4} b^{5} + 4 \, a^{2} b^{7} + b^{9}\right )} \sin \left (x\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 335, normalized size = 1.90 \begin {gather*} -\frac {{\left (3 \, a^{3} b^{2} - 2 \, a b^{4}\right )} \log \left (\frac {{\left | 2 \, a \tan \left (\frac {1}{2} \, x\right ) - 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a \tan \left (\frac {1}{2} \, x\right ) - 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{{\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )} \sqrt {a^{2} + b^{2}}} + \frac {2 \, {\left (a b^{4} \tan \left (\frac {1}{2} \, x\right ) + a^{2} b^{3}\right )}}{{\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )} {\left (a \tan \left (\frac {1}{2} \, x\right )^{2} - 2 \, b \tan \left (\frac {1}{2} \, x\right ) - a\right )}} - \frac {2 \, {\left (9 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, x\right )^{5} - 3 \, b^{4} \tan \left (\frac {1}{2} \, x\right )^{5} + 12 \, a b^{3} \tan \left (\frac {1}{2} \, x\right )^{4} - 4 \, a^{4} \tan \left (\frac {1}{2} \, x\right )^{3} + 18 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, x\right )^{3} - 2 \, b^{4} \tan \left (\frac {1}{2} \, x\right )^{3} - 12 \, a^{3} b \tan \left (\frac {1}{2} \, x\right )^{2} + 12 \, a b^{3} \tan \left (\frac {1}{2} \, x\right )^{2} + 9 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, x\right ) - 3 \, b^{4} \tan \left (\frac {1}{2} \, x\right ) - 4 \, a^{3} b + 8 \, a b^{3}\right )}}{3 \, {\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )} {\left (\tan \left (\frac {1}{2} \, x\right )^{2} + 1\right )}^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.87, size = 586, normalized size = 3.33 \begin {gather*} -\frac {\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4\,\left (4\,a^4\,b+45\,a^2\,b^3-4\,b^5\right )}{3\,\left (a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6\right )}-\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^6\,\left (2\,b^5-3\,a^2\,b^3\right )}{a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6}+\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^5\,\left (4\,a^5-9\,a^3\,b^2+32\,a\,b^4\right )}{3\,\left (a^2+b^2\right )\,\left (a^4+2\,a^2\,b^2+b^4\right )}-\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3\,\left (4\,a^5+15\,a^3\,b^2-34\,a\,b^4\right )}{3\,\left (a^2+b^2\right )\,\left (a^4+2\,a^2\,b^2+b^4\right )}-\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (8\,a^4\,b-31\,a^2\,b^3+6\,b^5\right )}{3\,\left (a^2+b^2\right )\,\left (a^4+2\,a^2\,b^2+b^4\right )}+\frac {2\,a\,\left (11\,a\,b^3-4\,a^3\,b\right )}{3\,\left (a^2+b^2\right )\,\left (a^4+2\,a^2\,b^2+b^4\right )}+\frac {2\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^7\,\left (2\,a\,b^3-3\,a^3\,b\right )}{a^6+3\,a^4\,b^2+3\,a^2\,b^4+b^6}+\frac {2\,b\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (a^3\,b+16\,a\,b^3\right )}{3\,\left (a^2+b^2\right )\,\left (a^4+2\,a^2\,b^2+b^4\right )}}{-a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^8+2\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^7-2\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^6+6\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^5+6\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+2\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {x}{2}\right )+a}-\frac {a\,b^2\,\mathrm {atan}\left (\frac {1{}\mathrm {i}\,\mathrm {tan}\left (\frac {x}{2}\right )\,a^7-a^6\,b\,1{}\mathrm {i}+3{}\mathrm {i}\,\mathrm {tan}\left (\frac {x}{2}\right )\,a^5\,b^2-a^4\,b^3\,3{}\mathrm {i}+3{}\mathrm {i}\,\mathrm {tan}\left (\frac {x}{2}\right )\,a^3\,b^4-a^2\,b^5\,3{}\mathrm {i}+1{}\mathrm {i}\,\mathrm {tan}\left (\frac {x}{2}\right )\,a\,b^6-b^7\,1{}\mathrm {i}}{{\left (a^2+b^2\right )}^{7/2}}\right )\,\left (3\,a^2-2\,b^2\right )\,2{}\mathrm {i}}{{\left (a^2+b^2\right )}^{7/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________